package group.hhsw.purchase.service.impl;

import group.hhsw.common.model.params.Check;
import group.hhsw.common.model.vo.DetailOrder;
import group.hhsw.feign.clients.UserClient;
import group.hhsw.purchase.service.PurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("7")
public class CheckWhitelist implements PurchaseService {

    @Autowired
    private UserClient userClient;

    @Override
    public DetailOrder atomicService(Check check) {
        Boolean is = userClient.checkWhitelist(check.getUserId());
        DetailOrder detailOrder = new DetailOrder();
        detailOrder.setWhitelistIsOk(is);
        return detailOrder;
    }
}
